//
//	(c) 2009 Andrew Kalmacky
//

#ifndef _K_LOGGER_TEST_H_
#define _K_LOGGER_TEST_H_

#include "logger.h"

namespace LoggerTest
{

	struct Point
	{
	   int x, y;
	};

	::Log::Stream &operator<< (::Log::Stream& s, const Point &val)
	{
	  return s << T_("Point {x=") << val.x << T_(", y=") << val.y << T_("}");
	}

	class TestClass
	{
	public:
		typedef Log::Logger<TestClass, Log::lv_Verbose> logger;

		TestClass()
		{
			logger::info("test");
		}

		void method()
		{
			logger::verbose("in method");
		}
	};

	struct Main
	{
		Main()
		{
			TestClass c;
			c.method();
			Log::app::info("Main addr is ", &main);

		   Point myPoint;
		   Log::app::info("p=", myPoint);
		}
	} main;
}

template<>
const char_t* const LoggerTest::TestClass::logger::prefix = T_("[test]");


#endif // _K_LOGGER_TEST_H_
